import { defineConfig } from 'vitepress'

export default defineConfig({
  title: '超级视频合成',
  description: '超级视频合成 API 文档',
  base: '/pyJianYingDraft/',
  lang: 'zh-CN',

  themeConfig: {
    logo: '/logo.png',
    nav: [
      { text: '首页', link: '/' },
      { text: '快速开始', link: '/guide/getting-started' },
      { text: 'API 参考', link: '/api/overview' },
      { text: '项目设计', link: '/guide/business-logic' },
    ],

    sidebar: {
      '/guide/': [
        {
          text: '指南',
          items: [
            { text: '快速开始', link: '/guide/getting-started' },
            { text: '环境配置', link: '/guide/environment' },
            { text: '基本概念', link: '/guide/concepts' },
            { text: '业务逻辑', link: '/guide/business-logic' },
            { text: '认证授权', link: '/guide/authentication' },
            { text: '错误处理', link: '/guide/error-handling' }
          ]
        }
      ],
      '/api/': [
        {
          text: 'API 接口',
          items: [
            { text: '接口概览', link: '/api/overview' },
            { text: '认证接口', link: '/api/auth' },
            { text: '用户管理', link: '/api/users' },
            { text: '项目管理', link: '/api/projects' },
            { text: '项目模板', link: '/api/templates' },
            { text: '视频预览', link: '/api/preview' },
            { text: '健康检查', link: '/api/health' }
          ]
        }
      ],
      '/templates/': [
        {
          text: '模板系统',
          items: [
            { text: '模板概览', link: '/templates/overview' },
            { text: '文本配置', link: '/templates/text' },
            { text: '视频配置', link: '/templates/video' },
            { text: '音频配置', link: '/templates/audio' },
            { text: '画布配置', link: '/templates/canvas' },
            { text: '动画效果', link: '/templates/animations' }
          ]
        }
      ],
      '/sdk/': [
        {
          text: 'SDK 参考',
          items: [
            { text: 'SDK 概览', link: '/sdk/overview' },
            { text: '脚本文件', link: '/sdk/script-file' },
            { text: '轨道系统', link: '/sdk/tracks' },
            { text: '片段管理', link: '/sdk/segments' },
            { text: '素材处理', link: '/sdk/materials' },
            { text: '时间工具', link: '/sdk/time-utils' }
          ]
        }
      ],
      '/examples/': [
        {
          text: '示例',
          items: [
            { text: '基础示例', link: '/examples/basic' },
            { text: '文本片段', link: '/examples/text-segment' },
            { text: '视频合成', link: '/examples/video-composition' },
            { text: '多轨道项目', link: '/examples/multi-track' },
            { text: '模板使用', link: '/examples/templates' }
          ]
        }
      ]
    },

    socialLinks: [
      { icon: 'github', link: 'https://github.com/yourusername/pyJianYingDraft' }
    ],

    footer: {
      message: 'Released under the MIT License.',
      copyright: 'Copyright © 2024 pyJianYingDraft'
    },

    search: {
      provider: 'local'
    },

    editLink: {
      pattern: 'https://github.com/yourusername/pyJianYingDraft/edit/main/docs/:path',
      text: '在 GitHub 上编辑此页'
    },

    lastUpdated: {
      text: '最后更新',
      formatOptions: {
        dateStyle: 'medium',
        timeStyle: 'short'
      }
    }
  },

  markdown: {
    lineNumbers: true,
    container: {
      tipLabel: '提示',
      warningLabel: '警告',
      dangerLabel: '危险',
      infoLabel: '信息',
      detailsLabel: '详细信息'
    }
  }
})
